{__NOLAYOUT__}
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>登录-微窝网络</title>
    <meta name="author" content="http://www.drunkce.com/" />
    <link rel="stylesheet" href="/static/css/common.css" />
    <style>
        .sys-bg{width:99.9%;height:auto;border:0px solid #999;margin:0 auto;background-image: url("/static/images/sys-login.jpg");background-size:100% 100%;background-repeat: no-repeat;}
        #sys-form{position:relative;top:23%;left:32.5%;width:680px;height:460px;border:1px solid #fff;background-color:#fff}
        .sys-title{font-size:26px;color:#111;margin-top:70px;margin-left:35%;margin-bottom:40px;}
        .sys-username{margin:20px auto;text-align:center;}
        .sys-username input{width:60%;height:45px;line-height:45px;border:1px solid #EEEEEE}
        .sys-pw{margin:20px auto;text-align:center;}
        .sys-pw input{width:60%;height:45px;line-height:45px;border:1px solid #EEEEEE}
        .sys-validate{margin:20px 19.5%;text-align:left;}
        .sys-validate .validate{width:40%;height:45px;line-height:45px;border:1px solid #EEEEEE}
        .showvalidate{width:30%;height:45px;line-height:45px;background-color:#fff;border:0px solid #ccc}
        .sys-validate img{width:25%;height:45px;vertical-align:-18px;}
        .pw-icon{font-size:14px;}
        .check-logining{margin:0 auto;text-align:center;}
        .check-logining input{width:60%;height:50px;line-height:45px;font-size:18px;color:#fff;background-color:#45B98B;border:0px}
    </style>
</head>
<body>
<div class="sys-bg">
    <form method="POST" action="{:url('manager/common/logging')}" id="sys-form">
        <div class="sys-title">网站后台管理系统</div>
        <div class='sys-username' >
            <input type="text" name="account" value="" placeholder="请输入手机号/邮箱/用户名" autocomplete="off" class=""/>
            <span class="account-icon"></span>
        </div>
        <div class="sys-pw">
            <input type="password" name="password" value="" placeholder="请输入登录密码" class=""/>
            <span class="pw-icon"></span>
        </div>
        <div class="sys-validate">
            <input type="text" name="verify" value="" placeholder="请输入验证码" autocomplete="off" class="validate"/>
            <img src="{:url('index/common/verify')}" class="imga" id="code"/>
            <span class="pw-icon">看不清?</span><a href="javascript:void(0)" class="pw-icon" style="color:#45B98B" onclick="fleshVerify()">换一张</a>
            <input type="hidden" value="3" name="flag"/>
        </div>
        <div class="check-logining">
            <input type="submit" name="" value="登&nbsp;&nbsp;录"  />
        </div>
    </form>
</div>
<script type="text/javascript" src="/static/plugins/jquery/jquery-1.9.1.min.js"></script>
<script>
    $(document).ready(function(){
        $('.sys-bg').css('height',$(window).height());
        $('form').on('submit', function(){
            var e_account = $('[name=account]'),
                    e_password = $('[name=password]'),
                    e_verify = $('[name=verify]'),
                    v_account = e_account.val(),
                    v_password = e_password.val(),
                    v_verify = e_verify.val(),
                    url_action = $('form').attr('action');
            $.ajax({
                url : url_action,
                data : {
                    username : v_account,
                    password : v_password,
                    verify : v_verify
                },
                type : 'post',
                dataType : 'json',
                success : function(data){
                    if (!data) data = {message : '登录失败!'};
                    if (data.result) return location.href = '{:url("manager/index/index")}';
                    fleshVerify();
                    alert(data.message);
                }
            });
            return false;
        });
    });
    function fleshVerify(){
        //重载验证码
        $('[name=verify]').val('');
        document.getElementById('code').src= "{:url('index/common/verify')}?"+Math.random();
    }
</script>
</body>
</html>